/* 

function f1() {
  ？？？
}
let result = f1();
console.log(result.inc());//1
console.log(result.inc());//2
console.log(result.inc());//3

*/

function f1() {
    let sum = 0;

    return {
        inc() {
            sum++;
            return sum;
        }
    }
}

let result = f1();
console.log(result.inc()); //1
console.log(result.inc()); //2
console.log(result.inc()); //3